<?php

namespace Apps\Common\Models;

/**
 * 美粒宝典点赞Model
 * @author     chenxiaolin
 * @date        2016年1月19日
 * @version     2.0.0
 * @copyright   Copyright 2016 meelier.com
 */
class CosBeautyCanonAssist extends \PhalconPlus\Database\Model
{

	/**
	 *
	 * @var integer
	 */
	public $id;

	/**
	 *
	 * @var string
	 */
	public $mobile_sign;

	/**
	 *
	 * @var integer
	 */
	public $user_id;

	/**
	 *
	 * @var integer
	 */
	public $beauty_canon_id;
	
	/**
	 *
	 * @var string
	 */
	public $setdate;
	

	/**
	 * Initialize method for model.
	 */
	public function initialize()
	{
		$this->belongsTo('beauty_canon_id', 'Apps\Common\Models\CosBeautyCanon', 'id', array('alias' => 'CosBeautyCanon'));
		$this->belongsTo('user_id', 'Apps\Common\Models\UserBase', 'user_id', array('alias' => 'UserBase'));
	}

	/**
	 * Returns table name mapped in the model.
	 *
	 * @return string
	 */
	public function getSource()
	{
		return 'cos_beauty_canon_assist';
	}

	/**
	 * Allows to query a set of records that match the specified conditions
	 *
	 * @param mixed $parameters
	 * @return QuestionAnswerFollow[]
	 */
	public static function find($parameters = null)
	{
		return parent::find($parameters);
	}

	/**
	 * Allows to query the first record that match the specified conditions
	 *
	 * @param mixed $parameters
	 * @return QuestionAnswerFollow
	 */
	public static function findFirst($parameters = null)
	{
		return parent::findFirst($parameters);
	}

	/**
	 * Independent Column Mapping.
	 * Keys are the real names in the table and the values their names in the application
	 *
	 * @return array
	 */
	public function columnMap()
	{
		return array(
				'id' => 'id',
				'mobile_sign' => 'mobile_sign',
				'user_id' => 'user_id',
				'beauty_canon_id' => 'beauty_canon_id',
				'setdate' => 'setdate'
		);
	}
	
	

}
